import {BASE_URL} from '@/services/api'
import {METHOD, request} from '@/utils/request'


export async function saveSysCode(sysCode, url) {
  let method = METHOD.POST
  if (url.indexOf('/') > 0) {
    method = METHOD.PATCH
  }
  return request(`${BASE_URL}/sysCode/` + url, method, sysCode)
}


export async function querySysCode(payload) {
  return request(`${BASE_URL}/sysCode/querySysCode`, METHOD.GET, payload)
}

export async function deleteSysCode(payload) {
  return request(`${BASE_URL}/sysCode/deleteSysCode/` + payload, METHOD.DELETE)
}

